NAPPS-1175 | Adds IOS-XR OS Upgrades Support#398
Open
jtdub wants to merge 10 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Cisco IOS-XR (eXR / 64-bit) device driver to PyNTC with support for staging golden ISOs, running the async install add → install activate → reload → install commit workflow, and documenting/adding unit coverage around that behavior.
Changes:
- Introduces
IOSXRDevice(cisco_iosxr_ssh) with OS upgrade orchestration and URL-basedremote_file_copy. - Registers the new driver in the device factory and documentation (MkDocs + user library overview).
- Adds unit tests for IOS-XR behavior and updates existing device-creation test to include IOS-XR.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_infra.py | Adds IOS-XR device creation coverage via factory patching. |
| tests/unit/test_devices/test_iosxr_device.py | New unit tests covering IOS-XR facts, copy flow, and upgrade workflow primitives. |
| pyntc/devices/iosxr_device.py | New IOS-XR SSH driver implementing golden-ISO upgrades and remote file copy. |
| pyntc/devices/init.py | Registers cisco_iosxr_ssh and exports IOSXRDevice. |
| mkdocs.yml | Adds IOS-XR module to generated code reference nav. |
| docs/user/lib_overview.md | Documents IOS-XR support and golden-ISO requirement/workflow. |
| changes/398.added | Towncrier entry for IOS-XR support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+416
to
+420
| r"Host name or IP address": "", | ||
| r"Source username|Username": src.username or "", | ||
| r"Password": src.token or "", | ||
| r"yes/no|\[confirm\]|Are you sure": "", | ||
| } |
Comment on lines
+376
to
+377
| log.debug("Host %s: File %s not found in 'dir' output on %s.", self.host, filename, file_system) | ||
| return False |
| command_args["expect_string"] = expect_string | ||
| command_args.update(kwargs) | ||
|
|
||
| response = self.native.send_command(**command_args) |
Contributor
There was a problem hiding this comment.
Check for self.native.send_command and probably update to use self._send_command method we defined.
…r_device_reboot to use uptime rather than waiting for the ssh connection to drop
gsnider2195
reviewed
Jun 27, 2026
Comment on lines
+870
to
+872
| raise NotImplementedError( | ||
| "IOS-XR has no standalone save; software is committed by install_os via 'install commit'." | ||
| ) |
Contributor
There was a problem hiding this comment.
We're going to have to update OS upgrades to skip save on IOS-XR devices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: NAPPS-1175
What's Changed:
Caveats
show redundancy,show platform vm)upgrade hw-module location all fpd all,show hw-module location <loc> fpd)hw-module location 0/<standby>/CPU0 reload,redundancy switchover)Integration Test